﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PreeRegisterModel;
using System.Web.Script.Serialization;
using PreeRegisterBLL.Security;

namespace PreeRegisterBLL
{
    public class csSerialize
    {
        #region 反序列化接口返回报文 检验报告推送平台返回报文

        public static ResponseModel DecodeResponseResult(string ResponseJson)
        {
            try
            {
                EncodeModel responseModel_Encode = csSerialize.ResponseInfo_Encode(ResponseJson);
                string head_json = Security.Base64.DecodeBase64(responseModel_Encode.head);
                string body_json = "";
                if (responseModel_Encode.body.Contains("%"))
                    body_json = Security.Base64.DecodeBase64(System.Web.HttpUtility.UrlDecode(responseModel_Encode.body));
                else
                    body_json = Security.Base64.DecodeBase64(responseModel_Encode.body);

                ResponseModel responseModel = new ResponseModel();

                Head head = csSerialize.DeHead(head_json);
                Body body = csSerialize.DeBody(body_json);
                responseModel.head = head;
                responseModel.body = body;
                return responseModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化返回的加密的结果信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static EncodeModel ResponseInfo_Encode(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                EncodeModel responseModel_Encode = js.Deserialize<EncodeModel>(json);    //将json数据转化为对象类型并赋值给list
                return responseModel_Encode;
            }
            catch (Exception err)
            {
                throw;
            }
        }


        /// <summary>
        /// 反序列化结果头信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Head DeHead(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                Head head = js.Deserialize<Head>(json);    //将json数据转化为对象类型并赋值给list
                return head;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化结果内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Body DeBody(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                Body body = js.Deserialize<Body>(json);    //将json数据转化为对象类型并赋值给list

                return body;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 头信息
        /// <summary>
        /// 序列化头信息
        /// </summary>
        /// <param name="myhead"></param>
        /// <returns></returns>
        public static string Head()
        {
            try
            {
                //获取头信息
                Head myhead = ResultDecode.GetHead();
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();
                string json = js.Serialize(myhead);
                //返回加密后的头信息
                return Base64.EncodeBase64(json);
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化申请头信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Head RequestHeadInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                Head head = js.Deserialize<Head>(json);    //将json数据转化为对象类型并赋值给list
                return head;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 头信息_简单
        /// <summary>
        /// 序列化头信息_简单
        /// </summary>
        /// <param name="myhead"></param>
        /// <returns></returns>
        public static string Head_Sample()
        {
            try
            {
                //获取头信息
                Head_Sample myhead = ResultDecode.GetHead_Sample();
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();
                string json = js.Serialize(myhead);
                //返回加密后的头信息
                return Base64.EncodeBase64(json);
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化申请头信息_简单
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Head_Sample RequestHeadInfo_Sample(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                Head_Sample head = js.Deserialize<Head_Sample>(json);    //将json数据转化为对象类型并赋值给list
                return head;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 诊疗ID获取

        /// <summary>
        /// 序列化获取诊疗ID信息返回内容
        /// </summary>
        /// <param name="identityGetResponseModel"></param>
        /// <returns></returns>
        public static string IdentityGetResponseModel(IdentityGetResponseModel identityGetResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(identityGetResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化诊疗ID信息请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static IdentityGetRequestModel identityGetRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                IdentityGetRequestModel identityGetRequestModel = js.Deserialize<IdentityGetRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return identityGetRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 预约信息
        /// <summary>
        /// 序列化预约结果信息
        /// </summary>
        /// <param name="orderRequest"></param>
        /// <returns></returns>
        public static string OrderResponseInfo(OrderResponseModel orderResponse)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(orderResponse);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化预约申请信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderRequestModel OrderRequestInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderRequestModel orderRequestModel = js.Deserialize<OrderRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return orderRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 序列化预约返回内容信息
        /// </summary>
        /// <param name="body"></param>
        /// <returns></returns>
        public static string OrderResponseBodyInfo(OrderResponseReturnModel body)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(body);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化预约申请内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderParameterModel OrderRequestBodyInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderParameterModel orderParameterModel = js.Deserialize<OrderParameterModel>(json);    //将json数据转化为对象类型并赋值给list
                return orderParameterModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化预约申请内容信息_主索引标志
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderParameterModel_Index OrderRequestBodyInfo_Index(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderParameterModel_Index orderParameterModel = js.Deserialize<OrderParameterModel_Index>(json);    //将json数据转化为对象类型并赋值给list
                return orderParameterModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 取消预约信息

        /// <summary>
        /// 序列化取消预约结果信息
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string CancelOrderResponseInfo(CancelOrderResponseModel cancelOrderResponse)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(cancelOrderResponse);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化取消预约申请信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CancelOrderRequestModel CancelOrderRequestInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CancelOrderRequestModel cancelOrderRequestModel = js.Deserialize<CancelOrderRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return cancelOrderRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化取消预约申请信息_联康  liujia160102
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CancelOrderRequestModel_lk CancelOrderRequestModel_lk(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CancelOrderRequestModel_lk cancelOrderRequestModel_lk = js.Deserialize<CancelOrderRequestModel_lk>(json);    //将json数据转化为对象类型并赋值给list
                return cancelOrderRequestModel_lk;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 更新排班号源

        /// <summary>
        /// 序列化排班&号源更新信息
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string WorkUpdateResponseInfo(WorkUpdateResponseModel workUpdateResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workUpdateResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班&号源更新信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkUpdateRequestModel WorkUpdateRequestInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkUpdateRequestModel workUpdateRequestModel = js.Deserialize<WorkUpdateRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return workUpdateRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 序列化排班&号源返回内容
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string WorkUpdateResponseBodyInfo(WorkUpdateBodyModel workUpdateBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workUpdateBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班&号源请求内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkUpdateModel WorkUpdateRequestBodyInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkUpdateModel workUpdateModel = js.Deserialize<WorkUpdateModel>(json);    //将json数据转化为对象类型并赋值给list
                return workUpdateModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 获取排班号源

        /// <summary>
        /// 序列化排班&号源返回内容
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string WorkGetResponseBodyModel(WorkGetResponseBodyModel workGetResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workGetResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班&号源请求内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkGetRequestBodyModel WorkGetRequestBodyModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkGetRequestBodyModel workGetRequestBodyModel = js.Deserialize<WorkGetRequestBodyModel>(json);    //将json数据转化为对象类型并赋值给list
                return workGetRequestBodyModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 获取号源明细

        /// <summary>
        /// 序列化号源明细返回内容
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string WorkSourceResponseModel(WorkSourceResponseModel workSourceResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workSourceResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化号源明细请求内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkSourceRequestModel WorkSourceRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkSourceRequestModel workSourceRequestModel = js.Deserialize<WorkSourceRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return workSourceRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 预约执行情况

        /// <summary>
        /// 序列化预约执行情况更新信息
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string OrderExeResponseInfo(OrderExeInfoResponseModel orderExeInfoResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(orderExeInfoResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化预约执行情况更新信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderExeInfoRequestModel OrderExeRequestInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderExeInfoRequestModel orderExeInfoRequestModel = js.Deserialize<OrderExeInfoRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return orderExeInfoRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 序列化预约执行情况返回内容信息
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string OrderExeResponseBodyInfo(OrderExeInfoBodyModel orderExeInfoBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(orderExeInfoBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化预约执行情况请求内容信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderExeInfoModel OrderExeRequestBodyInfo(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderExeInfoModel orderExeInfoModel = js.Deserialize<OrderExeInfoModel>(json);    //将json数据转化为对象类型并赋值给list
                return orderExeInfoModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 医院实际就诊量

        /// <summary>
        /// 序列化医院实际就诊量更新信息
        /// </summary>
        /// <param name="cancelOrderResponse"></param>
        /// <returns></returns>
        public static string MedInfoResponseModel(MedInfoResponseModel medInfoResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(medInfoResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化医院实际就诊量更新信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static MedInfoRequestModel MedInfoRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                MedInfoRequestModel medInfoRequestModel = js.Deserialize<MedInfoRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return medInfoRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 科室信息更新

        /// <summary>
        /// 序列化科室信息更新返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DeptUpdateResponseBodyModel(DeptUpdateResponseBodyModel deptUpdateResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(deptUpdateResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化科室信息更新请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DeptUpdateRequestBodyModel DeptUpdateRequestBodyModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DeptUpdateRequestBodyModel deptUpdateRequestBodyModel = js.Deserialize<DeptUpdateRequestBodyModel>(json);    //将json数据转化为对象类型并赋值给list
                return deptUpdateRequestBodyModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 科室信息获取

        /// <summary>
        /// 序列化科室信息获取返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DeptGetResponseBodyModel(DeptGetResponseBodyModel deptGetResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(deptGetResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化科室信息更新请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DeptGet DeptGet(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DeptGet DeptGet = js.Deserialize<DeptGet>(json);    //将json数据转化为对象类型并赋值给list
                return DeptGet;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 医生信息更新

        /// <summary>
        /// 序列化医生信息更新返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DoctorUpdateResponseBodyModel(DoctorUpdateResponseBodyModel doctorUpdateResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(doctorUpdateResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化医生信息更新请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DoctorUpdateRequestBodyModel DoctorUpdateRequestBodyModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DoctorUpdateRequestBodyModel doctorUpdateRequestBodyModel = js.Deserialize<DoctorUpdateRequestBodyModel>(json);    //将json数据转化为对象类型并赋值给list
                return doctorUpdateRequestBodyModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 医生信息获取

        /// <summary>
        /// 序列化医生信息获取返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DoctorGetResponseBodyModel(DoctorGetResponseBodyModel doctorGetResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(doctorGetResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化医生信息更新请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DoctorGetRequestBodyModel DoctorGetRequestBodyModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DoctorGetRequestBodyModel doctorGetRequestBodyModel = js.Deserialize<DoctorGetRequestBodyModel>(json);    //将json数据转化为对象类型并赋值给list
                return doctorGetRequestBodyModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 心跳信息

        /// <summary>
        /// 序列化心跳信息返回内容
        /// </summary>
        /// <param name="heartbeatModel"></param>
        /// <returns></returns>
        public static string HeartbeatModel_Response(HeartbeatModel heartbeatModel)
        {
            try
            {
                //liujia150906
                CommonBLL.WriteLog("5|sysnc|heartbeat|\r\n" + "333" + "\r\n\r\n");
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(heartbeatModel);
                //liujia150906
                CommonBLL.WriteLog("6|sysnc|heartbeat|\r\n" + json + "\r\n\r\n");
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化心跳信息请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static HeartbeatModel HeartbeatModel_Request(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                HeartbeatModel heartbeatModel = js.Deserialize<HeartbeatModel>(json);    //将json数据转化为对象类型并赋值给list
                return heartbeatModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 排班号源统计

        /// <summary>
        /// 序列化排班号源统计返回内容
        /// </summary>
        /// <param name="workGetcountResponseBodyModel"></param>
        /// <returns></returns>
        public static string WorkGetcountResponseBodyModel(WorkGetcountResponseBodyModel workGetcountResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workGetcountResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班号源统计请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkGetcountRequestBodyModel WorkGetcountRequestBodyModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkGetcountRequestBodyModel workGetcountRequestBodyModel = js.Deserialize<WorkGetcountRequestBodyModel>(json);    //将json数据转化为对象类型并赋值给list
                return workGetcountRequestBodyModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 排班号源比对

        /// <summary>
        /// 序列化排班号源比对返回内容
        /// </summary>
        /// <param name="workCompareResponseModel"></param>
        /// <returns></returns>
        public static string WorkCompareResponseModel(WorkCompareResponseModel workCompareResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workCompareResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班号源比对请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkCompareRequestModel WorkCompareRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkCompareRequestModel workCompareRequestModel = js.Deserialize<WorkCompareRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return workCompareRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 排班号源排查

        /// <summary>
        /// 序列化排班号源排查返回内容
        /// </summary>
        /// <param name="workCompareResponseModel"></param>
        /// <returns></returns>
        public static string WorkDetailResponseModel(WorkDetailResponseModel workDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化排班号源排查请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WorkDetailRequestModel WorkDetailRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WorkDetailRequestModel workDetailRequestModel = js.Deserialize<WorkDetailRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return workDetailRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 获取订单对比

        /// <summary>
        /// 序列化订单对比返回内容
        /// </summary>
        /// <param name="workCompareResponseModel"></param>
        /// <returns></returns>
        public static string OrderCompareResponseModel(OrderCompareResponseModel orderCompareResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(orderCompareResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化订单对比请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static OrderCompareRequestModel OrderCompareRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                OrderCompareRequestModel orderCompareRequestModel = js.Deserialize<OrderCompareRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return orderCompareRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 监控排班数量

        /// <summary>
        /// 序列化排班数量监控返回内容
        /// </summary>
        /// <param name="workMonitorResponseBodyModel"></param>
        /// <returns></returns>
        public static string WorkMonitorResponseBodyModel(WorkMonitorResponseBodyModel workMonitorResponseBodyModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(workMonitorResponseBodyModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询检验报告列表

        /// <summary>
        /// 序列化查询检验报告列表返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string LabReportListResponseModel(LabReportListResponseModel labReportListResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(labReportListResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询检验报告列表请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static LabReportListRequestModel LabReportListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                LabReportListRequestModel labReportListRequestModel = js.Deserialize<LabReportListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return labReportListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询影像报告列表

        /// <summary>
        /// 序列化查询影像报告列表返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string PacsPatInfoListResponseModel(LocalPacsModel.PacsPatInfoListResponseModel Model)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(Model);
                return json;
            }
            catch (Exception err)
            {
                throw;
            }
        }

        /// <summary>
        /// 序列化查询影像报告列表返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string InPatResponseModel(LocalPacsModel.InPatResponseModel Model)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(Model);
                return json;
            }
            catch (Exception err)
            {
                throw;
            }
        }

        /// <summary>
        /// 反序列化查询影像报告列表内容byTime，报告时间
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static LocalPacsModel.PacsPatInfoListByTimeRequestModel PacsPatInfoListByTimeRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                LocalPacsModel.PacsPatInfoListByTimeRequestModel Model = js.Deserialize<LocalPacsModel.PacsPatInfoListByTimeRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return Model;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询影像报告列表内容byInCode,住院号
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static LocalPacsModel.PacsPatInfoByInCodeRequestModel PacsPatInfoByInCodeRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                LocalPacsModel.PacsPatInfoByInCodeRequestModel Model = js.Deserialize<LocalPacsModel.PacsPatInfoByInCodeRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return Model;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询检验报告明细

        /// <summary>
        /// 序列化查询检验报告明细返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string LabReportDetailResponseModel(LabReportDetailResponseModel labReportDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(labReportDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询检验报告明细请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static LabReportDetailRequestModel LabReportDetailRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                LabReportDetailRequestModel labReportDetailRequestModel = js.Deserialize<LabReportDetailRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return labReportDetailRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询检查报告列表

        /// <summary>
        /// 序列化查询检查报告列表返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string PacsReportListResponseModel(PacsReportListResponseModel PacsReportListResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(PacsReportListResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询检查报告列表请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static PacsReportListRequestModel PacsReportListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                PacsReportListRequestModel PacsReportListRequestModel = js.Deserialize<PacsReportListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return PacsReportListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询检查报告明细

        /// <summary>
        /// 序列化查询检查报告明细返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string PacsReportDetailResponseModel(PacsReportDetailResponseModel PacsReportDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(PacsReportDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询检查报告明细请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static PacsReportDetailRequestModel PacsReportDetailRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                PacsReportDetailRequestModel PacsReportDetailRequestModel = js.Deserialize<PacsReportDetailRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return PacsReportDetailRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询体检报告列表

        /// <summary>
        /// 序列化查询体检报告列表返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string CheckReportListResponseModel(CheckReportListResponseModel CheckReportListResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(CheckReportListResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询体检报告列表请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CheckReportListRequestModel CheckReportListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CheckReportListRequestModel CheckReportListRequestModel = js.Deserialize<CheckReportListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return CheckReportListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }



        #endregion

        #region 查询体检报告明细

        /// <summary>
        /// 序列化查询体检报告明细返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string CheckReportDetailResponseModel(CheckReportDetailResponseModel CheckReportDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(CheckReportDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询体检报告明细请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CheckReportDetailRequestModel CheckReportDetailRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CheckReportDetailRequestModel CheckReportDetailRequestModel = js.Deserialize<CheckReportDetailRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return CheckReportDetailRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion


        #region 查询体检综检建议

        /// <summary>
        /// 序列化查询体检综检建议返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string CheckAdvicesDetailResponseModel(CheckAdvicesDetailResponseModel CheckAdvicesDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(CheckAdvicesDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询体检综检建议请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CheckAdvicesListRequestModel CheckAdvicesListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CheckAdvicesListRequestModel CheckAdvicesListRequestModel = js.Deserialize<CheckAdvicesListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return CheckAdvicesListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询缴费项

        /// <summary>
        /// 序列化查询缴费项获取返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string NotPayResponseModel(NotPayResponseModel notPayResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(notPayResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询缴费项请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static NotPayRequestModel notPayRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                NotPayRequestModel notPayRequestModel = js.Deserialize<NotPayRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return notPayRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 查询订单状态

        /// <summary>
        /// 序列化查询订单返回内容
        /// </summary>
        /// <param name="payOrderResponseModel"></param>
        /// <returns></returns>
        public static string PayOrderResponseModel(PayOrderResponseModel payOrderResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(payOrderResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询订单状态请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static PayOrderRequestModel PayOrderRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                PayOrderRequestModel payOrderRequestModel = js.Deserialize<PayOrderRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return payOrderRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 支付结果通知

        /// <summary>
        /// 序列化支付结果通知返回内容
        /// </summary>
        /// <param name="pyResultResponseModel"></param>
        /// <returns></returns>
        public static string PayResultResponseModel(PayResultResponseModel payResultResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(payResultResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        public static string PayResultResponseItemModel(PayResultResponseItemModel payResultResponseItemModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(payResultResponseItemModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        /// <summary>
        /// 反序列化支付结果通知请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static PayResultRequstModel PayResultRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                PayResultRequstModel notPayRequestModel = js.Deserialize<PayResultRequstModel>(json);    //将json数据转化为对象类型并赋值给list
                return notPayRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 退费


        /// <summary>
        /// 反序列化退费结果通知请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static RegisterFadeModel RegisterFadeRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                RegisterFadeModel registerFadeModel = js.Deserialize<RegisterFadeModel>(json);    //将json数据转化为对象类型并赋值给list
                return registerFadeModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 序列化退费结果通知返回内容
        /// </summary>
        /// <param name="registerFadeResponseModel"></param>
        /// <returns></returns>
        public static string RegisterFadeResponseModel(RegisterFadeResponseModel registerFadeResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(registerFadeResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 查询就诊状态

        /// <summary>
        /// 序列化查询就诊状态返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DiagnoseStateResponseModel(DiagnoseStateResponseModel diagnoseStateResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(diagnoseStateResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询就诊状态请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DiagnoseStateRequestModel DiagnoseStateRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DiagnoseStateRequestModel diagnoseStateRequestModel = js.Deserialize<DiagnoseStateRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return diagnoseStateRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询排队叫号

        /// <summary>
        /// 序列化查询排队叫号返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string ClinicQueueResponseModel(ClinicQueueResponseModel clinicQueueResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(clinicQueueResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询排队叫号请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ClinicQueueRequestModel ClinicQueueRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ClinicQueueRequestModel clinicQueueRequestModel = js.Deserialize<ClinicQueueRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return clinicQueueRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询门诊已缴费

        /// <summary>
        /// 序列化查询门诊已缴费返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string ClinicFareResponseModel(ClinicFareResponseModel clinicFareResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(clinicFareResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询门诊已缴费请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ClinicFareRequestModel ClinicFareRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ClinicFareRequestModel clinicFareRequestModel = js.Deserialize<ClinicFareRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return clinicFareRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 交住院押金

        /// <summary>
        /// 序列化交住院押金返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string DepositPayResponseModel(DepositPayResponseModel depositPayResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(depositPayResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化交住院押金请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static DepositPayRequestModel DepositPayRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                DepositPayRequestModel depositPayRequestModel = js.Deserialize<DepositPayRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return depositPayRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院患者信息查询

        /// <summary>
        /// 序列化住院患者信息获取返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string ParentInfoResponseModel(ParentInfoResponseModel parentInfoResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(parentInfoResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化住院患者请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ParentInfoRequestModel ParentInfoRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ParentInfoRequestModel parentInfoRequestModel = js.Deserialize<ParentInfoRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return parentInfoRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 住院费用查询

        /// <summary>
        /// 序列化住院费用查询返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string HospitalFareResponseModel(HospitalFareResponseModel hospitalFareResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(hospitalFareResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化住院费用查询请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static HospitalFareRequestModel HospitalFareRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                HospitalFareRequestModel hospitalFareRequestModel = js.Deserialize<HospitalFareRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return hospitalFareRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院服务 绑定关系
        /// <summary>
        /// 序列化绑定关系返回内容
        /// </summary>
        /// <param name="synBindResponseModel"></param>
        /// <returns></returns>
        public static string SynBindResponseModel(SynBindResponseModel synBindResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(synBindResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化绑定关系请求
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static SynBindRequestModel SynBindRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                SynBindRequestModel synBindRequestModel = js.Deserialize<SynBindRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return synBindRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院服务 检验报告列表
        /// <summary>
        /// 序列化检验报告列表返回内容
        /// </summary>
        /// <param name="reportListResponseModel"></param>
        /// <returns></returns>
        public static string ReportLsitResponseModel(ReportListResponseModel reportListResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(reportListResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化检验报告列表
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ReportListRequestModel ReportListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ReportListRequestModel reportListRequestModel = js.Deserialize<ReportListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return reportListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院服务 检验报告明细
        /// <summary>
        /// 序列化检验报告明细返回内容
        /// </summary>
        /// <param name="reportDetailResponseModel"></param>
        /// <returns></returns>
        public static string ReportDetailResponseModel(ReportDetailResponseModel reportDetailResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(reportDetailResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化检验报告明细
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ReportDetailRequestModel ReportDetailRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ReportDetailRequestModel reportDetailRequestModel = js.Deserialize<ReportDetailRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return reportDetailRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院服务 费用清单
        /// <summary>
        /// 序列化费用清单返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string CostListResponseModel(CostListResponseModel costListResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(costListResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化费用清单请求
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CostListRequestModel CostListRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CostListRequestModel costListRequestModel = js.Deserialize<CostListRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return costListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 住院服务 费用汇总
        /// <summary>
        /// 序列化费用清单返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string CostTotalResponseModel(CostTotalResponseModel costTotalResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(costTotalResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化费用清单请求
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static CostTotalRequestModel CostTotalRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                CostTotalRequestModel costListRequestModel = js.Deserialize<CostTotalRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return costListRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 人工窗口退费查询

        /// <summary>
        /// 序列化人工窗口退费查询返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string WindowFadeFareResponseModel(WindowFadeFareResponseModel windowFadeFareResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(windowFadeFareResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化人工窗口退费查询请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static WindowFadeFareRequestModel WindowFadeFareRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                WindowFadeFareRequestModel windowFadeFareRequestModel = js.Deserialize<WindowFadeFareRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return windowFadeFareRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 门诊费用发票号查询

        /// <summary>
        /// 序列化门诊费用发票号查询返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string ClinicFareBillNumResponseModel(ClinicFareBillNumResponseModel clinicFareBillNumResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(clinicFareBillNumResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化门诊费用发票号查询请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static ClinicFareBillNumRequestModel ClinicFareBillNumRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ClinicFareBillNumRequestModel clinicFareBillNumRequestModel = js.Deserialize<ClinicFareBillNumRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return clinicFareBillNumRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 人工窗口退费置标志

        /// <summary>
        /// 序列化人工窗口退费置标志返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string SetWFFFlagResponseModel(SetWFFFlagResponseModel setWFFFlagResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(setWFFFlagResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化人工窗口退费置标志请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static SetWFFFlagRequestModel SetWFFFlagRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                SetWFFFlagRequestModel setWFFFlagRequestModel = js.Deserialize<SetWFFFlagRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return setWFFFlagRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region 查询挂号记录

        /// <summary>
        /// 序列化查询挂号记录返回内容
        /// </summary>
        /// <param name="deptUpdateResponseBodyModel"></param>
        /// <returns></returns>
        public static string RegisterRecordResponseModel(RegisterRecordResponseModel registerRecordResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(registerRecordResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 反序列化查询挂号记录请求内容
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static RegisterRecordRequestModel RegisterRecordRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                RegisterRecordRequestModel registerRecordRequestModel = js.Deserialize<RegisterRecordRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return registerRecordRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        #endregion

        #region
        public static SieafInitRequestModel CheckSieafInitRequestModel(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                SieafInitRequestModel CheckSieafInitRequestModel = js.Deserialize<SieafInitRequestModel>(json);    //将json数据转化为对象类型并赋值给list
                return CheckSieafInitRequestModel;
            }
            catch (Exception err)
            {

                throw;
            }
        }

        /// <summary>
        /// 序列化查询体检报告列表返回内容
        /// </summary>
        /// <param name="SieafInitRequestModel"></param>
        /// <returns></returns>
        public static string CheckSieafInitResponseModel(SieafInitResponseModel SieafInitResponseModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(SieafInitResponseModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion

        #region 加解密
        /// <summary>
        /// 反序列化加密的请求JSON串
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static EncodeModel EncodeDeSerialize(string json)
        {
            try
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                js.MaxJsonLength = int.MaxValue;
                EncodeModel encodeModel = js.Deserialize<EncodeModel>(json);    //将json数据转化为对象类型并赋值给list

                CommonBLL.WriteLog(string.Format("反序列化报文长度：{0},最大长度：{1}\r\n"
                    , json.Length, js.MaxJsonLength));
                return encodeModel;
            }
            catch (Exception err)
            {
                CommonBLL.WriteLog("报文反序列化异常：" + err.ToString() + "\r\n");
                throw;
            }
        }

        /// <summary>
        /// 序列化加密后的结果信息
        /// </summary>
        /// <param name="orderRequest"></param>
        /// <returns></returns>
        public static string ResponseInfo(EncodeModel encodeModel)
        {
            try
            {
                //序列化头信息
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                string json = js.Serialize(encodeModel);
                return json;
            }
            catch (Exception err)
            {

                throw;
            }
        }
        #endregion
    }
}
